package com.jhy.seckill.utils;

import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.stereotype.Component;

@Component
public class MD5Util {
    private static final String salt = "NanjoYoshinoSatoshiYaginuma";
    public static String md5(String src)
    {
        return DigestUtils.md5Hex(src);
    }
    public static String firstEncrypt(String inputpass)
    {
        String str = inputpass+salt.substring(2,14);
        return md5(str);
    }
    public static String secondEncrypt(String inputpass)
    {
        String str = inputpass+salt.substring(3,8);
        return md5(str);
    }
}
